<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //给两个变量值
       var nam = 100;
       var nam1 = 200;
       //这里给一个if条件假如nam大于nam1
       if (nam > nam1){
           //要是nam大我们打印nam
           console.log(nam)
       } else{
           //要是nam不是最大的值那我们打印nam1
           console.log(nam1)
       }
    //给一个if判断 我们假如nam大于nam1
      
           //三目运算符
           console.log(nam > nam1 ? nam:nam1)
    </script>
</body>
</html>